Image processing apparatus, method of controlling the same, and program

ABSTRACT

An image processing apparatus includes a deciding unit configured to decide an attribute of each pixel contained in a bitmap from received print commands for printing a plurality of objects, a determination unit configured to determine whether each pixel of the generated bitmap is an edge pixel or not, and a changing unit configured to change the decided attribute of each pixel based on a result of the determination of whether the pixel is an edge pixel or not. The bitmap may be generated by drawing the plurality of objects.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing apparatus, a methodof controlling the same, and a program.

2. Description of the Related Art

There is an image processing apparatus that receives from a personalcomputer (PC) page description language (PDL) data of a single pageincluding draw commands for drawing a plurality of objects, rasterizesthe objects into a memory of a single page, and prints a drawing imageof the single page that is obtained by the rasterization. Such an imageprocessing apparatus determines attributes (text or photograph) of theobjects from the draw commands for the objects and executes imageprocessing according to the determination result.

For example, with respect to an area of the drawing image in which anobject having a text attribute exists, the image processing apparatusexecutes image processing to reproduce gray (R=G=B) using only a Ktoner. On an area of the drawing image in which an object having aphotograph attribute exists, the image processing apparatus executesimage processing to reproduce gray using CMYK toners (Japanese PatentApplication Laid-Open No. 2006-157791).

However, there are cases where an attribute of an object that isdetermined from a print command for printing the object isinappropriate.

SUMMARY OF THE INVENTION

According to an aspect of the present invention(s), an image processingapparatus and/or an image processing system includes a receiving unitconfigured to receive print commands for printing a plurality ofobjects, a generation unit configured to draw the plurality of receivedobjects to generate a bitmap, a deciding unit configured to decide anattribute of each pixel contained in the bitmap, from the received printcommands for the respective objects, a determination unit configured todetermine whether each pixel contained in the generated bitmap is anedge pixel or not, and a changing unit configured to change the decidedattribute of each pixel based on a result of the determination ofwhether the pixel is an edge pixel or not. Methods for controlling oneor more image processing apparatuses or systems and a computer-readablemedium storing a program that causes a computer to execute a method forcontrolling an image processing apparatus and/or system are alsoprovided.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a configuration diagram illustrating an image processingapparatus according to an exemplary embodiment.

FIG. 2 illustrates an example of a data structure of an attribute imageaccording to an exemplary embodiment.

FIGS. 3A, 3B, and 3C respectively illustrate examples 1, 2, and 3 of afilter of an edge detection unit according to an exemplary embodiment.

FIGS. 4A, 4B, 4C, 4D, 4E, and 4F respectively illustrate portionsdetected by an attribute error detection unit 104 according to a firstexemplary embodiment.

FIG. 5 illustrates a flow chart of the attribute error detection unitaccording to the first exemplary embodiment.

FIGS. 6A, 6B, and 6C illustrate a method by which an attribute decidingunit decides an attribute according to the first exemplary embodiment.

FIG. 7 is a flow chart of the attribute deciding unit according to thefirst exemplary embodiment.

FIG. 8 illustrates mixing percentages of an output color processing unitaccording to an exemplary embodiment.

FIGS. 9A, 9B, 9C, and 9D respectively illustrate portions detected by anattribute deciding unit according to a second exemplary embodiment.

FIG. 10 is a flow chart illustrating an attribute error detection unitaccording to the second exemplary embodiment.

FIGS. 11A, 11B, and 11C each illustrate a method by which attributedeciding unit decides an attribute according to the second exemplaryembodiment.

FIG. 12 is a flow chart of the attribute deciding unit according to thesecond exemplary embodiment.

DESCRIPTION OF THE EMBODIMENTS

Various exemplary embodiments, features, and aspects of the inventionwill be described in detail below with reference to the drawings.

The first exemplary embodiment describes an example of an imageprocessing apparatus that reduces a difference in image processingbetween text and photograph of the same color.

FIG. 1 illustrates the configuration of the image processing apparatusaccording to the present exemplary embodiment. An image processingapparatus 100 includes a PDL data acquisition unit 101, a drawing unit102, an edge detection unit 103, an attribute error detection unit 104,an attribute deciding unit 105, an output color processing unit 106, ahalftone processing unit 107, and a printer engine 108.

The image processing apparatus 100 includes therein a central processingunit (CPU), a read-only memory (ROM), and a random-access memory (RAM).The CPU loads a program for the image processing apparatus 100 from theROM and executes the program for the image processing apparatus 100using the RAM as a temporary storage area. The image processingapparatus 100 performs the foregoing operations to execute theprocessing of each unit (101 to 107).

When the PDL data acquisition unit 101 receives PDL data from anexternal computer 109, the PDL data acquisition unit 101 outputs the PDLdata to the drawing unit 102. The PDL data is data including drawcommands (also referred to as “print command”) for drawing a pluralityof objects. The drawing unit 102 generates a drawing image (bitmap) andan attribute image based on the PDL data received from the PDL dataacquisition unit 101. The attribute image is an image containing thesame numbers of pixels as those of the drawing image in a vertical andhorizontal direction. The attribute image can contain information aboutthe presence/absence of an object, the presence/absence of an edge,and/or the presence/absence of an attribute error in each pixel as wellas attribute values based on the draw commands (FIG. 2). The edgedetection unit 103 receives the drawing image and the attribute imagefrom the drawing unit 102 and detects an edge from the drawing image(the edge detection unit 103 detects a pixel constituting an edge, i.e.,edge pixel). Then, the edge detection unit 103 sets a flag indicatingthat an edge is contained, to a pixel of the attribute image thatcorresponds to the edge pixel. The attribute error detection unit 104receives the drawing image and the attribute image from the edgedetection unit 103. Then, the attribute error detection unit 104 detectsfrom the drawing image the pixels in which text and photograph of thesame color are adjacent to each other, and the attribute error detectionunit 104 sets a flag indicating that an attribute error is contained, topixels of the attribute image that correspond to the detected pixels.The attribute deciding unit 105 receives the drawing image and theattribute image from the attribute error detection unit 104 and changesthe attribute values of the pixels to which the flag indicating that anattribute error is contained is set. The output color processing unit106 receives the drawing image and the attribute image from theattribute deciding unit 105 and executes color processing on each pixelof the drawing image based on the attribute image. In this way, a CMYKimage is generated. The halftone processing unit 107 converts themultivalued CMYK image received from the output color processing unit106 into a binary CMYK image and outputs the binary CMYK image to theprinter engine 108. Lastly, based on the binary CMYK image received fromthe halftone processing unit 107, the printer engine 108 forms toners ofthe respective colors on an output medium such as a sheet.

The following describes details of the attribute image. The attributeimage is an image containing the same numbers of vertical and horizontalpixels as those of the drawing image. The attribute image containsinformation (flags) used for changing the image processing that is to beexecuted on each pixel. FIG. 2 illustrates an example of the datastructure of the attribute image according to the present exemplaryembodiment. In the example illustrated in FIG. 2, a single pixel of theattribute image contains 6-bit information including 1-bit object bit,1-bit edge bit, 1-bit attribute error bit, and 3-bit attribute value. Apixel with the object bit set to 1 is a pixel on which an object isdrawn by the drawing unit 102. A pixel with the object bit set to 0 is apixel on which no object is drawn. A pixel with the edge bit set to 1 isa pixel that constitutes an edge on the drawing image. A pixel with theedge bit set to 0 is a pixel that does not constitute an edge on thedrawing image. A pixel with the attribute error bit set to 1 is a textpixel that is adjacent to a photograph of the same color on the drawingimage. A pixel with the attribute error bit set to 0 is a pixel otherthan the text pixel that is adjacent to a photograph of the same coloron the drawing image. The attribute value indicates image processing fortext (hereinafter, text processing), image processing for photograph(hereinafter, photograph processing), or intermediate image processingbetween the text processing and the photograph processing that is to beapplied to a pixel. The intermediate image processing includes multiplelevels. Intermediate processing 1 applies processing close to thephotograph processing, whereas intermediate processing 6 appliesprocessing close to the text processing.

The following describes details of the drawing unit 102. The drawingunit 102 executes initialization processing on every pixel of theattribute image prior to the drawing. Specifically, the drawing unit 102sets the object bit of every pixel to “no object” (0), the edge bit to“no edge” (0), the attribute error bit to “no attribute error” (0), andthe attribute value to “photograph processing” (0×00). After theinitialization processing, the drawing unit 102 receives PDL data fromthe PDL data acquisition unit 101 and generates a drawing image and anattribute image from the PDL data.

The following describes details of the generation of an attribute image.When generating the attribute image, the drawing unit 102 sets theobject bit of a pixel of the drawing image on which an object is to bedrawn to “object contained” (1). In a case where the object is a textobject or a line object, the drawing unit 102 sets the attribute valueof the pixel on which the object is to be drawn to “text processing”(0×07). In a case where the object to be drawn on the pixel is an objectother than a text object or a line object or no object is to be drawn onthe pixel, the attribute value of the pixel remains “photographprocessing” (0×00). As to a pixel on which multiple objects are to bedrawn, the drawing unit 102 overwrites the drawing image and theattribute image with information of a draw command for an object that isto be drawn last on the pixel. In other words, in a case where aphotograph object is to be drawn on a pixel after a text object is drawnon the pixel, the colors (RGB values) of the photograph object arewritten to the pixel on the drawing image, and the pixel on theattribute image is set to “object contained” (1) and “photographprocessing” (0×00).

The following describes details of the edge detection unit 103. The edgedetection unit 103 executes edge detection on the drawing image and setsthe edge flag of a pixel from which an edge is detected to “edgecontained” (1). On the other hand, the edge flag of a pixel from whichno edge is detected remains “no edge” (0). For example, the edgedetection unit 103 applies an edge detection filter to each of thecolors R, G, and B of the drawing image to obtain edge amounts. Then,the edge detection unit 103 calculates the sum of squares of the edgeamount of each color and executes threshold determination on thecalculated value. A pixel having a value greater than a threshold (pixeldetermined as having a value greater than the threshold) is an edgepixel, whereas a pixel having a value equal to or smaller than thethreshold is not an edge pixel. The edge detection filters used by theedge detection unit 103 are not limited. For example, the edge detectionunit 103 may use a space filter illustrated in FIG. 3A, adifferentiation filter illustrated in FIG. 3B, or a filter illustratedin FIG. 3C for making comparisons with adjacent pixels. Further, thecolor space that the edge detection unit 103 uses to execute the edgedetection is not limited. The edge detection unit 103 may use agrayscale color space, CMYK space, or L*a*b* space. In other words, theedge detection unit 103 may convert the drawing image in the RGB colorspace into a different color space and then executes the edge detection.In the case where the edge detection unit 103 executes the edgedetection in the L*a*b* space, it is desirable to execute the edgedetection only on the L-component. In this case, it is not necessary tocalculate the sum of squares of the edge amount, and the edge amountobtained by applying the edge detection filter to the L-component may becompared directly with the threshold. The same applies to a case ofusing the grayscale color space.

The following describes the attribute error detection unit 104. Theattribute error detection unit 104 detects a pixel in which no edgeexists although the attribute value is changed. More specifically, theattribute error detection unit 104 detects a text pixel having the samecolor as an adjacent pixel that is a photograph pixel. The detection ofsuch a pixel is executed to avoid a situation in which completelydifferent types of color processing are applied to adjacent pixels,e.g., the color processing for text is applied to a focused pixel whilethe color processing for photograph is applied to a pixel adjacent tothe focused pixel. In this way, generation of a border between pixels ofthe same color on a printed matter can be prevented. FIG. 4A illustratesan example in which a rectangle is drawn and the text “A” is drawn overthe rectangle with the same color. FIG. 4B illustrates the object flagsand the attribute values of the attribute image. Note that the attributevalue of the pixel on which the text and the rectangle overlap, is “textprocessing.”

FIG. 4C illustrates the edge flags of the attribute image. A pixel at aboundary between the rectangle and the text is “no edge,” because thedrawing image does not contain an edge. FIG. 4D illustrates theattribute error flags detected by the attribute error detection unit104. The attribute error detection unit 104 sets to “attribute errorcontained” the attribute error flag of a portion in which no edge existsalthough the attribute value is changed.

The following describes details of the processing of the attribute errordetection unit 104 (i.e., processing to obtain the state illustrated inFIG. 4D) with reference to the flow chart illustrated in FIG. 5.

In step S501, the attribute error detection unit 104 selects pixels oneby one starting from the upper left pixel. In step S502, the attributeerror detection unit 104 determines whether the edge bit of the selectedpixel is “no edge,” whether the attribute value of the selected pixel is“text processing,” and whether the object bit of the selected pixel is“object contained.” In FIG. 4E, a pixel determined as true in step S502is in light gray. A pixel set to “edge,” “text processing,” and “objectcontained” is in dark gray.

If the determination result in step S502 is true (light gray portion)(YES in step S502), then in step S503, the attribute error detectionunit 104 determines whether four pixels that are vertically orhorizontally adjacent to the selected pixel include a pixel that theobject flag is “object contained” and the attribute value is “photographprocessing.” If the determination result in step S503 is true (YES instep S503), the attribute error detection unit 104 sets the attributeerror flag of the selected pixel to “attribute error contained.” A pixelthat is determined as true in step S503 is in dark color in FIG. 4F. Inthis way, the pixels in dark color in FIG. 4D (pixels of “attributeerror contained”) are successfully identified.

On the other hand, if the determination result in step S502 is false (NOin step S502) or if the determination result in step S502 is true butthe determination result in step S503 is false (NO in step S503), theattribute error detection unit 104 does not change the attribute errorflag of the selected pixel (the attribute error flag remains “noattribute error”).

In step S505, the attribute error detection unit 104 determines whetherall the pixels are selected. If not all the pixels are selected (NO instep S505), then in step S501, the attribute error detection unit 104selects an unprocessed pixel. The attribute error detection unit 104executes the foregoing steps S501 to S505 on every pixel so that theattribute error flags of the text pixels having the same color as thatof an adjacent pixel that is a photograph pixel are changed to“attribute error contained.”

The following describes the processing of the attribute deciding unit105, with reference to FIG. 6. The attribute deciding unit 105 changes,among the pixels with the attribute value set to “text processing” andthe object bit set to “object contained”, the attribute values of pixelsset to “attribute error contained” and the attribute values of pixels ina neighborhood of the pixels set to “attribute error contained”, to theintermediate processing 1, 2, 3, 4, 5, or 6 or the photographprocessing. The attribute deciding unit 105 changes the attribute valuessuch that the closer the pixel is to a pixel set to “attribute errorcontained” or the larger the number of pixels set to “attribute errorcontained” surrounding the pixel, the processing closer to thephotograph processing is performed. In the foregoing way, the attributevalues of the pixels around the pixels set to “attribute errorcontained” are gradually switched between the photograph processing andthe text processing by the attribute deciding unit 105.

The left part of FIG. 6A is the same as that of FIG. 4D. The attributedeciding unit 105 selects text pixels one by one starting from the upperleft text pixel and, as illustrated in the right part of FIG. 6A, theattribute deciding unit 105 extracts a 7×7 window surrounding theselected pixel (the pixel at the center of the 7×7 window is a focusedpixel). Then, the attribute deciding unit 105 calculates convolutionvalues of the extracted 7×7 pixels and convolution coefficientsspecified in FIG. 6B and executes threshold determination on theconvolution values to decide the attribute values. FIG. 6C illustrates athreshold determination table. The attribute deciding unit 105 changesthe attribute value of a selected pixel with a smaller convolution valueto an attribute value closer to the text processing, whereas theattribute deciding unit 105 changes the attribute value of a selectedpixel with a greater convolution value to an attribute value closer tothe photograph processing, because a pixel that is closer to a pixel setto “attribute error contained” and is surrounded by a larger number ofpixels set to “attribute error contained” has a greater convolutionvalue. The attribute deciding unit 105 executes the foregoing processingon each pixel.

The following describes details of the processing of the attributedeciding unit 105, with reference to FIG. 7. FIG. 7 is a flow chart ofthe attribute deciding unit 105. In step S701, the attribute decidingunit 105 selects pixels one by one starting from the upper left pixel.If the determination result in step S702 is true (YES in step S702),then in step S703, the attribute deciding unit 105 calculatesconvolution of the attribute error flags and the convolutioncoefficients of the selected pixel and the surrounding pixels. In stepS704 following step S703, the attribute deciding unit 105 decides anattribute value based on the calculation results and changes theattribute value of the selected pixel to the decided attribute value. Onthe other hand, if the determination result in step S702 is false (NO instep S702), the attribute deciding unit 105 does not change theattribute value of the selected pixel. In step S705, the attributedeciding unit 105 determines whether all the pixels are selected. If notall the pixels are selected (NO in step S705), then in step S701, theattribute deciding unit 105 selects an unprocessed pixel. The attributedeciding unit 105 executes the foregoing steps S701 to S705 on everypixel to change the attribute values of the pixel set to “attributeerror contained,” and the attribute values of the pixels in theneighborhood of the pixels set to “attribute error contained” among thepixels with the attribute value set to “text processing” and the objectbit set to “object contained”, to any of the intermediate processing 1,2, 3, 4, 5, or 6 or the photograph processing.

The following describes details of the output color processing unit 106.The output color processing unit 106 includes a text color processingunit, a photograph color processing unit, and a mixed processing unit.The output color processing unit 106 executes color processing on eachpixel of the drawing image based on the attribute value to generate aCMYK image. Specifically, the output color processing unit 106 executesthe following processing. (1) The output color processing unit 106selects pixels one by one starting from the upper left pixel and inputsthe color values of the selected pixel to the text color processing unitand the photograph color processing unit. (2) Next, the output colorprocessing unit 106 inputs the outputs from the text color processingunit and the photograph color processing unit and the attribute value ofthe pixel to the mixed processing unit. (3) The output color processingunit 106 uses the color values output from the mixed processing unit asa color processing result of the selected pixel.

The output color processing unit 106 executes the foregoing processingon each pixel and outputs the results as CMYK data.

The text color processing unit and the photograph color processing uniteach convert input color values (RGB values) into CMYK color valuesbased on a color gamut of the device. For example, in a case where colorvalues close to gray (e.g., color values in which differences between Rand G, G and B, and B and R are each equal to or smaller than athreshold value) are input, the text color processing unit converts theinput color values to a color value of K toner only (i.e., C=M=Y=0,0<=K). On the other hand, even in the case where color values close togray are input, the photograph color processing unit converts the colorvalues to color values to be reproduced with three CMY colors or fourCMYK colors (i.e., 0<C, 0<M, 0<Y). The mixed processing unit calculatesa weighted average of two input CMYK color values based on the attributevalue of the pixel and outputs the calculated weighted average.

FIG. 8 illustrates an example of mixing ratios used by the mixedprocessing unit. For pixels with the attribute value closer to the textprocessing, the percentage of the output of the text color processing isset higher, whereas the percentage of the output of the photograph colorprocessing is set lower. On the other hand, for pixels with theattribute value closer to the photograph processing, the percentage ofthe output of the photograph color processing is set higher, whereas thepercentage of the output of the text color processing is set lower.Specifically, for example, in a case where the output of the photographcolor processing unit is C, M, Y, K=C1, M1, Y1, and K1 and the output ofthe text color processing unit is C, M, Y, K=C2, M2, Y2, K2, the outputof the mixed processing unit is C, M, Y, K=αC1+(1−α)C2, αM1+(1−α)M2,αY1+(1−α)Y2, and αK1+(1−α)K2, where α denotes an output percentage ofthe photograph color processing unit (e.g., 86%).

According to the present exemplary embodiment, the closer a text pixelis situated to a photograph pixel, the processing closer to thephotograph processing is executed on the text pixel having the samecolor as the photograph pixel. In this way, a sudden change in color ata border between text and photograph of the same color can be prevented.

The second exemplary embodiment will describe an example of an imageprocessing apparatus that executes processing close to text, on textwithin an image area. The only difference between the first and secondexemplary embodiments is the processing of the attribute error detectionunit 104 and the processing of the attribute deciding unit 105 in theimage processing apparatus 100. The following describes the processingof the attribute error detection unit 104 and the processing of theattribute deciding unit 105 according to the second exemplaryembodiment.

The following describes the attribute error detection unit 104. Theattribute error detection unit 104 detects a pixel with the attributevalue set to “photograph” that has the same color as its surroundingpixels. In other words, the attribute error detection unit 104 detects apixel identified as a photograph pixel, as the attribute image althoughthe pixel appears as text or a line to a human eye. The attribute errordetection unit 104 detects such a pixel to prevent a situation that agray text sent as an image (for example, in a case where a bitmap oftext is attached to PPT, the text is sent as an image) by a draw commandis reproduced with all CMYK colors. This prevents color from appearingaround gray text on a printed matter.

FIG. 9A illustrates an example in which an image draw command fordrawing a rectangle containing text and a draw command for drawing arectangle containing a photograph are sent. FIG. 9B illustrates theobject flags and the attribute values of the attribute image. In therectangle area, the attribute value is “photograph attribute” (attributeof photograph processing). FIG. 9C illustrates the edge flags of theattribute image. A pixel of a boundary of the text and a pixelconstituting an edge in the photograph are acquired as edges (a methodfor the edge acquisition is similar to that in the first exemplaryembodiment). FIG. 9D illustrates the attribute error flags detected bythe attribute error detection unit 104. The attribute error detectionunit 104 sets the attribute error flag of a photograph pixel having thesame color as its surrounding pixels to “attribute error contained.”

The following describes details of the processing of the attribute errordetection unit 104, with reference to the flow chart illustrated in FIG.10. In step S1001, the attribute error detection unit 104 selects pixelsone by one starting from the upper left pixel. In step S1002, theattribute error detection unit 104 determines whether the attributevalue of the selected pixel is “photograph processing” and whether theobject bit of the selected pixel is “object contained.”

If the determination result in step S1002 is true (YES in step S1002),then in step S1003, the attribute error detection unit 104 determineswhether the number of pixels having a similar color to the selectedpixel and existing within a predetermined neighborhood of the selectedpixel is equal to or larger than a predetermined number. In step S1003,it may be determined, for example, whether five or more pixels havingthe same color as that of the selected pixel exist within a 5×5 windowincluding the selected pixel at the center. If the determination resultin step S1003 is true (YES in step S1003), the attribute error detectionunit 104 changes the attribute error flag of the selected pixel to“attribute error contained.”

On the other hand, if the determination result in step S1002 is false(NO in step S1002) or if the determination result in step S1002 is truebut the determination result in step S1003 is false (NO in step S1003),the attribute error detection unit 104 does not change the attributeerror flag of the selected pixel (the attribute error flag remains “noattribute error”).

In step S1005, the attribute error detection unit 104 determines whetherall the pixels are selected. If not all the pixels are selected (NO instep S1005), then in step S1001, the attribute error detection unit 104selects an unprocessed pixel. The attribute error detection unit 104executes the foregoing steps S1001 to S1005 on every pixel so that theattribute error flag of every pixel with the attribute value set to“photograph” that has the same color as its surrounding pixels is set to“attribute error contained.”

The important point about the attribute error detection unit 104 is toset the attribute error flag of a photograph pixel having the same coloras its surrounding pixels to “attribute error contained,” and the flowillustrated in FIG. 10 is a mere example. For example, a flow includingthe following steps (1) to (5) may be employed.

(1) Find a pixel set to “object contained,” “photograph processing,” and“edge.”

(2) Find all pixels contained within an area surrounded by the foundpixels (the surrounded area needs to be a closed area formed bycontinuous pixels that are set to “object contained” and “photographprocessing” and are edge pixels).

(3) Whether every one of the pixels is a pixel set to “object contained”and “photograph processing” is determined.

(4) If it is determined that every one of the pixels is a pixel set to“object contained” and “photograph processing,” then it is determinedwhether all the colors of the pixels are the same as those of the pixelsforming the closed area and found in step (1).

(5) If it is determined that the colors are the same, every one of thepixels (i.e., pixels found in steps (1) and (2)) is set to “attributeerror contained.” Furthermore, the edge pixels forming the closed areasurrounding all the pixels found in steps (1) and (2) are set to“attribute error contained.”

The following describes the processing of the attribute deciding unit106.

The attribute deciding unit 106 changes every pixel set to “attributeerror contained” from “photograph processing” to “text processing.” Inthis way, the text processing is applied to the text within therectangle sent by the image draw command.

The following describes another example of the processing of theattribute deciding unit 106.

The attribute deciding unit 106 changes every R=G=B pixel, among thepixels set to “attribute error contained,” from “photograph processing”to “text processing.” In this way, the text processing is applied to agray text within the rectangle sent by the image draw command.

The following describes another example of the processing of theattribute deciding unit 106.

The attribute deciding unit 106 changes the attribute value of eachpixel set to “attribute error contained” and “edge,” among the pixelswith the attribute value set to “photograph processing” and the objectbit set to “object contained,” to any of text processing andintermediate processing 1, 2, 3, 4, 5, or 6. The attribute deciding unit106 also changes the attribute value of each pixel that is located closeto the foregoing pixels and set to “attribute error contained”, to anyof text processing and intermediate processing 1, 2, 3, 4, 5, or 6. Atthis time, the attribute deciding unit 106 changes the attribute valuessuch that the closer the pixel is to an edge pixel and the larger thenumber of edge pixels surrounding the pixel, the processing closer tothe text processing is executed.

The following describes details of the processing of the attributedeciding unit 105, with reference to FIG. 11.

The left part of FIG. 11A illustrates the attribute error flags of acase where text and photograph are both drawn by an image draw command.The attribute deciding unit 105 selects photograph pixels one by onestarting from the upper left photograph pixel and, as illustrated in theright part of FIG. 11A and extracts a 7×7 window surrounding theselected pixel. The attribute value of an edge pixel that is set to“attribute error contained” is 1, and the attribute value of any otherpixel is 0.

Next, the attribute deciding unit 105 calculates convolution values ofthe attribute values of the extracted 7×7 pixels and convolutioncoefficients specified in FIG. 11B and makes a threshold determinationon the convolution values to decide the attribute value of the selectedpixel.

FIG. 11C illustrates a threshold determination table. The attributedeciding unit 105 changes the attribute value of a selected pixel with asmaller convolution value to an attribute value closer to the photographprocessing (i.e., farther from a pixel that is set to “attribute errorcontained” and “edge”), whereas the attribute deciding unit 105 changesthe attribute value of a selected pixel with a greater convolution valueto an attribute value closer to the text processing, because the closera pixel is to a pixel set to “attribute error contained” and the largerthe number of edge pixels surrounding the pixel, the greater theconvolution value. The attribute deciding unit 105 executes theforegoing processing on each pixel.

FIG. 12 is a flow chart in which the attribute deciding unit 105 decidesthe attribute value of a pixel with the attribute value set to“photograph” and “attribute error contained.” In step S1201, theattribute deciding unit 105 selects pixels one by one starting from theupper left pixel. In step S1202, the attribute deciding unit 105determines whether the selected pixel is a pixel set to “photograph” and“attribute error contained.” If the determination result in step S1202is false (NO in step S1202), the processing proceeds to step S1205. Onthe other hand, if the determination result in step S1202 is true (YESin step S1202), then in step S1203, the attribute deciding unit 105calculates convolution values of pixels surrounding the selected pixelas described above with reference to FIG. 11. In step S1204 followingstep S1203, the attribute deciding unit 105 decides the attribute valueof the selected pixel based on the calculation result and changes theattribute value of the selected pixel to the decided attribute value. Instep S1205, the attribute deciding unit 105 determines whether all thepixels are selected. If not all the pixels are selected (NO in stepS1205), then in step S1201, the attribute deciding unit 105 selects anunprocessed pixel. The attribute deciding unit 105 executes theforegoing steps S1201 to S1205 on every pixel so that the attributevalue of a pixel closer to the pixels set to “edge” and “attribute errorcontained,” among the pixels with the attribute value set to “photographprocessing” and the object bit set to “object contained” and theattribute error bit set to “attribute error contained,” are changed tothe processing closer to the text processing. In the foregoing way, theattribute values of the pixels around the pixels set to “attribute errorcontained” are gradually switched between the photograph processing andthe text processing by the attribute deciding unit 105. Further, a stepof determining whether the selected pixel is R=G=B may be includedbetween steps S1201 and S1202 in FIG. 12, and the processing may proceedto step S1205 if the selected pixel is not R=G=B, and the processing mayproceed to step S1202 only if the selected pixel is R=G=B.

According to the present exemplary embodiment, the processing close tothe text processing is executed on a neighborhood portion of an edge oftext drawn by an image draw command to prevent color from appearing onblack text.

In an image processing apparatus including a processing unit between theoutput color processing unit 106 and the halftone processing unit 107 tolimit the amount of toner adhering to a CMYK image, processing similarto that of the output color processing unit 106 may be applied to theprocessing unit. For example, the processing unit includes a toneradhering amount limiting unit for text processing, a toner adheringamount limiting unit for photograph processing, and a mixed unit. Theprocessing unit selects pixels one by one starting from the upper leftpixel and inputs color values of a CMYK image of the selected pixel tothe toner adhering amount limiting unit for text processing and thetoner adhering amount limiting unit for photograph processing.

Next, the processing unit inputs the outputs from the toner adheringamount limiting unit for text processing and the toner adhering amountlimiting unit for photograph processing and the attribute value of thepixel, to the mixed processing unit. The processing unit uses colorvalues output from the mixed processing unit as a color processingresult of the selected pixel. The processing unit executes the foregoingprocessing on each pixel and outputs the results as CMYK data.

Other Exemplary Embodiments

The foregoing describes the first and second exemplary embodimentsseparately. The first exemplary embodiment describes the control inwhich a pixel of “text attribute” is focused and the attribute of thefocused pixel is changed to a different attribute. The second exemplaryembodiment describes the control in which a pixel of “photographattribute” is focused and the attribute of the focused pixel is changedto a different attribute.

Since the pixels to be focused in the two exemplary embodiments aredifferent, it is also suitable to include both features of the twoexemplary embodiments.

While the foregoing exemplary embodiments describe a single apparatuswhich includes each relevant feature, an image processing system mayinclude a plurality of apparatuses which cooperate together to realizethe necessary features.

Embodiments of the present invention can also be realized by a computerof a system or apparatus that reads out and executes computer executableinstructions recorded on a storage medium (e.g., non-transitorycomputer-readable storage medium) to perform the functions of one ormore of the above-described embodiment(s) of the present invention, andby a method performed by the computer of the system or apparatus by, forexample, reading out and executing the computer executable instructionsfrom the storage medium to perform the functions of one or more of theabove-described embodiment(s). The computer may comprise one or more ofa central processing unit (CPU), micro processing unit (MPU), or othercircuitry, and may include a network of separate computers or separatecomputer processors. The computer executable instructions may beprovided to the computer, for example, from a network or the storagemedium. The storage medium may include, for example, one or more of ahard disk, a random-access memory (RAM), a read only memory (ROM), astorage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2013-238322 filed Nov. 18, 2013, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. An image processing apparatus comprising: areceiving unit configured to receive print commands for printing aplurality of objects; a generation unit configured to draw the pluralityof received objects to generate a bitmap; a deciding unit configured todecide an attribute of each pixel contained in the bitmap, from thereceived print commands; a determination unit configured to determinewhether each pixel contained in the generated bitmap is an edge pixel ornot; and a changing unit configured to change the decided attribute ofeach pixel based on a result of the determination of whether the pixelis an edge pixel or not, wherein in a case where the decided attributeof at least one pixel of the bitmap is text and the determination unitdetermines that the at least one pixel of the bitmap is not an edgepixel, the changing unit changes the attribute of the at least one pixelof the bitmap from text to photograph.
 2. An image processing apparatuscomprising: a receiving unit configured to receive print commands forprinting a plurality of objects; a generation unit configured to drawthe plurality of received objects to generate a bitmap; a deciding unitconfigured to decide an attribute of each pixel contained in the bitmap,from the received print commands; a determination unit configured todetermine whether each pixel contained in the generated bitmap is anedge pixel or not; and a changing unit configured to change the decidedattribute of each pixel based on a result of the determination ofwhether the pixel is an edge pixel or not, wherein in a case where thedecided attribute of at least one pixel of the bitmap is photograph andthe determination unit determines that the at least one pixel of thebitmap is an edge pixel, the changing unit changes the attribute of theat least one pixel of the bitmap from photograph to text.
 3. An imageprocessing system comprising: a receiving unit configured to receiveprint commands for printing a plurality of objects; a generation unitconfigured to draw the plurality of received objects to generate abitmap; a deciding unit configured to decide an attribute of each pixelcontained in the bitmap, from the received print commands; adetermination unit configured to determine whether each pixel containedin the generated bitmap is an edge pixel or not; and a changing unitconfigured to change the decided attribute of each pixel based on aresult of the determination of whether the pixel is an edge pixel ornot, wherein in a case where the decided attribute of at least one pixelof the bitmap is text and the determination unit determines that the atleast one pixel of the bitmap is not an edge pixel, the changing unitchanges the attribute of the at least one pixel of the bitmap from textto photograph.
 4. An image processing system comprising: a receivingunit configured to receive print commands for printing a plurality ofobjects; a generation unit configured to draw the plurality of receivedobjects to generate a bitmap; a deciding unit configured to decide anattribute of each pixel contained in the bitmap, from the received printcommands; a determination unit configured to determine whether eachpixel contained in the generated bitmap is an edge pixel or not; and achanging unit configured to change the decided attribute of each pixelbased on a result of the determination of whether the pixel is an edgepixel or not, wherein in a case where the decided attribute of at leastone pixel of the bitmap is photograph and the determination unitdetermines that the at least one pixel of the bitmap is an edge pixel,the changing unit changes the attribute of the at least one pixel of thebitmap from photograph to text.
 5. A method of controlling an imageprocessing apparatus, the method comprising: receiving print commandsfor printing a plurality of objects; drawing the plurality of receivedobjects to generate a bitmap; deciding an attribute of each pixelcontained in the bitmap, from the received print commands; determiningwhether each pixel contained in the generated bitmap is an edge pixel ornot; and changing the decided attribute of each pixel based on a resultof the determination of whether the pixel is an edge pixel or not,wherein in a case where the decided attribute of at least one pixel ofthe bitmap is text and the at least one pixel of the bitmap isdetermined to not be an edge pixel, the attribute of the focused pixelis changed from text to photograph.
 6. A non-transitory storage mediumstoring a computer-readable program, which when executed by a computer,causes the computer to perform the method according to claim
 5. 7. Amethod of controlling an image processing apparatus, the methodcomprising: receiving print commands for printing a plurality ofobjects; drawing the plurality of received objects to generate a bitmap;deciding an attribute of each pixel contained in the bitmap, from thereceived print commands; determining whether each pixel contained in thegenerated bitmap is an edge pixel or not; and changing the decidedattribute of each pixel based on a result of the determination ofwhether the pixel is an edge pixel or not, wherein in a case where thedecided attribute of at least one pixel of the bitmap is photograph andthe at least one pixel of the bitmap is determined to be an edge pixel,the attribute of the focused pixel is changed from photograph to text.8. A non-transitory storage medium storing a computer-readable program,which when executed by a computer, causes the computer to perform themethod according to claim 7.